package com.aquarium.ui;

import com.aquarium.R;
import com.aquarium.ui.controller.ModuleControllerActivity;
//import com.aquarium.ui.controller.ModuleControllerActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;

public class MainSettingActivity extends Activity {

	private View mControllerSettingButton;
	private View mModuleControllButton;
	private View mAlarmSettingButton;
	private View mPasswordSettingButton;
	private View mModeSettingButton;

	private View mExitButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);

		setContentView(R.layout.main_setting);

		findViews();
		setListener();

	}

	private void findViews() {
		mControllerSettingButton = findViewById(R.id.controller_setting_layout);
		mModuleControllButton = findViewById(R.id.module_control_layout);
		mAlarmSettingButton = findViewById(R.id.alarm_setting_layout);
		mPasswordSettingButton = findViewById(R.id.password_setting_layout);
		mModeSettingButton = findViewById(R.id.mode_setting_layout);
		mExitButton = findViewById(R.id.back_button);
	}

	private void setListener() {
		mControllerSettingButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent();

				intent.setClass(MainSettingActivity.this,
						AliasSettingActivity.class);
				startActivity(intent);

			}
		});

		mModuleControllButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent();

				intent.setClass(MainSettingActivity.this,
						ModuleControllerActivity.class);
				startActivity(intent);
			}
		});

		mAlarmSettingButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent();

				intent.setClass(MainSettingActivity.this,
						AlarmSettingActivity.class);
				startActivity(intent);
			}
		});

		mPasswordSettingButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent();

				intent.setClass(MainSettingActivity.this,
						SecurityActivity.class);
				startActivity(intent);

			}
		});
		mModeSettingButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent();

				intent.setClass(MainSettingActivity.this,
						ModelSwitchActivity.class);
				startActivity(intent);

			}
		});
		mExitButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				finish();
			}
		});
	}
}
